<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="css/style.css">
<script src="jquery-1.7.2.min.js"></script>
<style>
body{width: 1200px;margin:0 auto;font-family: "Simsun",Tahoma,Arial,sans-serif;font-size: 14px;color:#000;}
.mydetail{width: 1200px;padding-bottom:50px }
table {background-color: transparent;border-collapse: collapse;border-spacing: 0;}
.mydetail th, .mydetail td {border: 1px solid #e2e2e2;}
.mydetail td,.mydetail th {text-align: center;padding: 10px 5px;}
.tal{text-align: left;}
.tac{text-align: center;}
.search-con{height: 50px;line-height: 50px;background:#f3f3f3;padding: 5px 30px;margin-bottom: 10px}
.search-con input{margin-right: 30px;}
.search-con span{color: red;font-weight: bold;}
.STYLE2 {font-size: medium}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
.aaa{display: inline-block;height: 40px;line-height: 40px;vertical-align: top;}
.check_anum{width: 40px;}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
	<table width="1200" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="100"><a href="http://www.ego-buy.com.cn/"><img src="image/bg11.jpg" alt="0" width="1200" height="76" border="0"></a></td>
      </tr>
      <tr>
        <td height="50"><img src="image/bg00.jpg" alt="0" width="1200" height="87"></td>
      </tr>
      <tr>
        <td height="50"><a href="index.php" class="STYLE2" style="margin-left:10px;">返回列表</a></td>
      </tr>
    </table>
	<div class="search-con">
		<form  method="post">
			
			<select name="project" id="" style="width: 150px;height: 25px">
				<option value="">请选择</option>
			<?php foreach ($project as $key=>$value){ ?>
				<option value="<?php echo $value['project']; ?>"><?php echo $value['project']; ?></option>
			<?php } ?>
			</select>
			<input type="submit" value="查询">
		</form>
	</div>
	<div class="mydetail">
		<form action="" method="POST"   enctype="multipart/form-data" >
			<table class="table_02">
				<tbody>
				<tr>
					<th class="titleA">项目名称</th>
					<th class="titleA">序号</th>
					<th class="titleA type">型号</th>
					<th class="titleA">规格参数</th>
					<th class="titleA">数量</th>
					<th class="titleA">报价</th>
					<th class="titleA" width="80">截至日期</th>
					<th class="titleA">竞价状态</th>
					<th class="titleA">税率（%）</th>
					<th class="titleA">交期（天）</th>
					<th class="titleA">询价类型</th>
					<th class="titleA">供应商代码</th>
					<th class="titleA">报价供应商</th>
					<th class="titleA">物料组</th>
					<th class="titleA">采购组</th>
					<th class="titleA">工厂组</th>
					<th class="titleA">配额</th>
					<th class="titleA" width="80">报价有效时间</th>
					<th class="titleA" width="80">报价无效时间</th>
					<th class="titleA">采购类型</th>
					<th class="titleA" width="30">操作</th>
				</tr>
				<?php if(!empty($infoAll)){ ?>
					<?php foreach ($infoAll as $key=>$value) { ?>
					<tr>
						<input type="hidden" class="p_pid"  value="<?php echo $value['pid']; ?>">
						<td><?php echo $value['project']; ?></td>
						<td><?php echo $key+1; ?></td>
						<td><?php echo $value['btype']; ?></td>
						<td><?php echo $value['bsize']; ?></td>
						<td><?php echo $value['bnumber']; ?></td>
						<td><?php echo $value['price']; ?></td>
						<td><?php echo date('Y-m-d H:i:s',$value['lasttime']); ?></td>
						<td><?php if($value['status'] == 0){echo "非竞价";}else if($value['status'] == 1){echo "竞价";} ?></td>
						<td><?php echo $value['rate']; ?></td>
						<td><?php echo $value['delivery']; ?></td>
						<td><?php echo $value['price_type']; ?></td>
						<td><?php echo $value['company_data']; ?></td>
						<td><?php echo $value['company_name']; ?></td>
						<td><?php echo $value['material']; ?></td>
						<td><?php echo $value['purchase']; ?></td>
						<td><?php echo $value['plant']; ?></td>
						<td><input type="text" class="check_anum" value="<?php echo $value['extranum']; ?>" ></td>
						<td><?php echo date('Y-m-d H:i:s',$value['validtime']); ?></td>
						<td><?php echo date('Y-m-d H:i:s',$value['invalidtime']); ?></td>
						<td><?php echo $value['purchase_type']; ?></td>
						<td><input type="checkbox" value="<?php echo $value['project'].'&'.$key; ?>" name="product[]"></td>
					</tr>
					<?php } ?>
				<?php }else{ ?>
					<tr>
						<td colspan="20">
							<span>暂无数据</span>
						</td>
					</tr> 
				<?php } ?>
				</tbody>
			</table>

			<p><span class="aaa">备注：</span><textarea name="note" id="" cols="30" rows="10"></textarea></p>
			附件：<input type="file"  name="file_name" ><span style="color:red;">(上传文件:.txt .excel .word)格式文件</span>
			<p><input type="submit" id="submit" value="提交"></p>
			
		</form>
	</div>

        <table width="1200" border="0" cellspacing="0" cellpadding="0">  
          <tr>
            <td height="100" align="center" valign="bottom"><p><span class="STYLE8 STYLE3"><a rel="nofollow" target="_blank" href="http://www.ego-buy.com.cn/faqListDetail.do?parent_id=108&id=112">集团简介 | </a><a rel="nofollow" target="_blank" href="http://www.ego-buy.com.cn/faqListDetail.do?parent_id=108&id=143">广告服务</a> | <a rel="nofollow" target="_blank" href="http://www.ego-buy.com.cn/faqListDetail.do?parent_id=108&id=115">版权信息 |</a> <a rel="nofollow" target="_blank" href="http://www.ego-buy.com.cn/faqListDetail.do?parent_id=108&id=113">商家入驻 </a> | <a rel="nofollow" target="_blank" href="http://www.ego-buy.com.cn/faqListDetail.do?parent_id=108&id=114">新闻动态</a></span></p></td>
          </tr>
          <tr>
            <td height="30" align="center"><span class="STYLE3">Copyright © 2014-2015 ego-buy.com.cn All Rights Reserved 粤ICP备15026826号</span></td>
          </tr>
        </table>
</body>
</html>
<script type="text/javascript">
	$('.check_anum').each(function() {
		var now_v = $(this).val();

		$(this).change(function(){
		var res = confirm('是否修改配额');

		if(res == true){
			var v = $(this).val();
			var p_pid = $(this).parents('tr').find('.p_pid').val();
			$.ajax({
				type:'POST',
				url :"examine.php",
				data: {
					'v': v,
					'p_pid':p_pid,
				}
			});
		}else{
			$(this).val(now_v);
		}
	});
});
	
</script>
